package sys.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import sys.entity.Statistics;
import sys.service.StatisticsService;

import java.util.List;

@RestController
@RequestMapping("statistics")
public class StatisticsController {


    @Autowired
    private StatisticsService statisticsService;

    @RequestMapping("findTeaByMaxStu")
    public List<Statistics> findTeaByMaxStu() {
        return statisticsService.findTeaByMaxStu();
    }


    @RequestMapping("findTeaByCountStu")
    public List<Statistics> findTeaByCountStu() {
        return statisticsService.findTeaByCountStu();
    }


    @RequestMapping("findStuByMaxScore")
    public List<Statistics> findStuByMaxScore() {
        return statisticsService.findStuByMaxScore();
    }


    @RequestMapping("findStuBySumScore")
    public List<Statistics> findStuBySumScore() {
        return statisticsService.findStuBySumScore();
    }


    @RequestMapping("findStuScoreCourseByMaxCourse")
    public List<Statistics> findStuScoreCourseByMaxCourse() {
        return statisticsService.findStuScoreCourseByMaxCourse();
    }

}
